//
//  DYGuidePageViewController.m
//  kafuMerchant
//
//  Created by 帝云科技 on 2018/9/10.
//  Copyright © 2018年 帝云科技. All rights reserved.
//

#import "DYGuidePageViewController.h"
#import "DYGuidePageView.h"
#import "DYNavigationController.h"
#import "DYTabBarController.h"

@interface DYGuidePageViewController ()

@property (nonatomic, strong) DYGuidePageView *detailView;


@end

@implementation DYGuidePageViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)dy_initUI{
    [super dy_initUI];
    [self.view addSubview:self.detailView];
}

- (DYGuidePageView *)detailView{
    if (_detailView == nil) {
        _detailView = [[DYGuidePageView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)];
        _detailView.backgroundColor = WhiteColor;
        
        __weak typeof(self)weakSelf = self;
        
        _detailView.pushBlock = ^(NSInteger a) {
            [weakSelf ClickJoinBtn];
        };
    }
    return _detailView;
}

- (void)ClickJoinBtn{
    //    储存guide状态
    [kUserDefaults setObject:@"1" forKey:@"guide"];
    self.view.window.rootViewController = [[DYTabBarController alloc]init];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
}
/*
 #pragma mark - Navigation
 
 // In a storyboard-based application, you will often want to do a little preparation before navigation
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
 // Get the new view controller using [segue destinationViewController].
 // Pass the selected object to the new view controller.
 }
 */

@end
